<?php
namespace app\mouth\controller;
use app\mouth\common\Api,
    app\mouth\model\CircleNewsModel,
    think\facade\Cache,
    think\Db;
/**
 * 圈子用户中心
 * Class CircleUserApi
 * @package app\mouth\controller
 */
class CircleNewsApi extends Api{
    public function index(){
        $event = CircleNewsModel::index(input('id'));
        return $this->jsons('40006','成功',$event);
    }
    /**
     * 新增点赞  1
     * 新增关注  2
     * 新增评论  3
     */
    public function fabulous(){
        $praisePeople = CircleNewsModel::praisePeople(input('id'),input('state'));
        return $this->jsons('40006','成功',$praisePeople);
    }

    /**
     * 聊天室
     */
    public function chat(){
        $volume = Db::name('car_volume_store')->where('vs_standard','标准洗车1')->select();
        foreach ($volume as $k=>$v){
            $shop[] = $v['st_id'];
        }
        $b['ma_id'] = array_unique($shop);
        $volumes = Db::name('store')->where($b)->select();
        echo '<pre>';
        var_dump($volumes);
    }

}